package com.zhdl.websocket.conf;

import com.zhdl.hardware_modules.web.service.HardwareDebugService;
import com.zhdl.websocket.server.WebSocketRunServer;
import com.zhdl.websocket.service.WebSocketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

/**
 * @Description:
 * @author: liu zhenming
 * @date: 2023/7/20 10:50
 */
@Configuration
public class MyWebSocketConf {

//    @Bean
//    public ServerEndpointExporter serverEndpointExporter() {
//        return new ServerEndpointExporter();
//    }

    @Autowired
    public void setWebSocketService(WebSocketService webSocketService) {
        WebSocketRunServer.webSocketService = webSocketService;
    }

    @Autowired
    public void setHardwareService(HardwareDebugService hardwareDebugService) {
        WebSocketRunServer.hardwareDebugService = hardwareDebugService;
    }
}
